/* gcc -o demo linuxGetTick.c */

#include <stdio.h>
#include <unistd.h>
int main(int argc , char *argv[])
{
    int sysHz = 0;
    sysHz = sysconf(_SC_CLK_TCK);
    printf("sysHz = %ld \n", sysHz );
    printf("tick count in ms: %ul\n", (unsigned long) times( NULL));
    sleep(1);
    printf("tick count in ms: %ul\n", (unsigned long) times( NULL));
    sleep(1);
    printf("tick count in ms: %ul\n", (unsigned long) times( NULL));
    sleep(1);
    printf("tick count in ms: %ul\n", (unsigned long) times( NULL));
    sleep(1);
    printf("tick count in ms: %ul\n", (unsigned long) times( NULL));
}

